package com.studymaster.util;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Timer;

public class test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		 Timer timer = new Timer();
		 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd ");
		  Date date = new Date();
		  sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		//定义开始时间字符串
		    String timeStr = "11:17:00"; 
		    timeStr = sdf.format(date)+timeStr;
		    try {
		        date = sdf.parse(timeStr);
		       } catch (ParseException e) {
		        // TODO Auto-generated catch block
		        e.printStackTrace();
		       }
		    if(date.getTime()<System.currentTimeMillis()){
		        date = new Date(date.getTime()+24*60*60*1000);
		       }
		 timer.schedule(new CreateSqliteTask(), 5000);

	}

}
